<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class ChargeUsedRecordTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('charge_used_record', function(Blueprint $table)
        {
            //余额消费记录
            $table->increments('id');
            $table->integer('user_id')  ->default(0)  ->comment('用户id');
            $table->string('order_num') ->nullable()  ->comment('订单号');
            $table->decimal('amount')   ->default(0)  ->comment('消费金额');
            $table->string('remark')    ->nullable()  ->comment('备注');
            $table->softDeletes();
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        //
    }
}
